package com.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.OutDrugBean;
import com.project.bean.OutWareHouseBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.Collection;

/**
 * @author RJ
 * @date 2022/9/15 19:51
 */
@Repository
public interface IWareHouseDao extends BaseMapper<OutWareHouseBean> {
    void addWareHouse(OutWareHouseBean outWareHouseBean);

    OutWareHouseBean getOutInfo(Integer outId);

    //中间表插入
    void addInfo(@Param("out") Collection<OutDrugBean> out, @Param("outId") Integer outId);

    IPage<OutWareHouseBean> cutOutByItem(Page<OutWareHouseBean> page, @Param("start") LocalDate startDate, @Param("end") LocalDate endDate,
                                         @Param("outUser") String outUser);
}
